/**
 * BizClientType.java 
 * Copyright © 2015-3015, 杭州泊享网络科技有限公司
 * 
 * @author Liu Tao
 * @create 2014年12月28日
 */
package com.pshare.artemis.basic.enums;


/**
 * 客户端业务分类
 */
public enum BizClientType {

	INDIVIDUAL_CLIENT(1, "用户A端"), MERCHANT_CLIENT(2, "商户端"), SYS_CLIENT(4, "管理员端");

	private int code;
	private String name;

	private BizClientType(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static Boolean codeOf(Integer code) {
		for (BizClientType commonEnum : BizClientType.values()) {
			if (new Integer(commonEnum.getCode()).equals(code)) {
				return true;
			}
		}
		return false;
	}
	
}
